<?php defined('IN_ADMIN') or exit('Access Denied!'); ?>

<form action="/admin/dish/save/<?=intval($shop_id);?>" method="post" id="myform">
  <input type="hidden" name="method" value="<?=$method;?>" />
  <div class="pad-10">
    <div class="col-tab">
      <ul class="tabBut cu-li" id="tab_import">
        <li id="tab_import_1" class="on">标准模式</li>
        <li id="tab_import_2"><a href="/admin/dish/perform/<?=intval($shop_id);?>?dailog=<?=array_get_int($_GET, 'dailog', 0);?>">快速模式</a></li>
      </ul>
      <div id="div_import_1" class="content pad-10">
        <table width="100%" class="table_form">
            <tr>
              <td colspan="4">选择分类：&nbsp;<select name="dish_cat" id="dish_cat">
                  <option>选择分类</option>
                  <?=View::options($cats, $data['dish_cat']);?>
                </select></td>
            </tr>
            <tr>
                <td>#</td>
                <td>菜名</td>
                <td>价格（元）</td>
                <td>描述</td>
             </tr>
          <tbody id="content">
   <?php
        $count = count($data);
        if($count > 50) $count = 50;
        if($count < 10) $count = 10;
        for($i=1; $i<=$count; $i++){
            $item = isset($data[$i-1]) ? $data[$i-1] : array();
   ?>
            <tr>
                <td><?=$i;?>.</td>
                <td><input type="text" name="name[]" size="20" value="<?=h($item['name']);?>" class="input-text" /></td>
                <td><input type="text" name="price[]" size="15" value="<?=h($item['price']);?>" class="input-text" /></td>
                <td><input type="text" name="description[]" size="40" value="<?=h($item['desc']);?>" class="input-text" /></td>
             </tr>
   <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="bk15"></div>
      <div class="btn">
        <input name="dosubmit" id="dosubmit" type="submit" value="提交" class="button">
      </div>
    </div>
  </div>
</form>
<script type="text/javascript">
$(document).ready(function(){
    //tabs('#tab_import', 'import');
});
</script>

